//
//  TextTableViewCell.m
//  chanyou
//
//  Created by 高爽 on 15-1-5.
//  Copyright (c) 2015年 wanli. All rights reserved.
//

#import "TextTableViewCell.h"

#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

#import "Masonry.h"

@implementation TextTableViewCell
- (void)dealloc
{
    [_content release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.content = [[UILabel alloc] init];
        // _content.backgroundColor = [UIColor cyanColor];
        [_content setFont:[UIFont systemFontOfSize:15.0f]];
        _content.numberOfLines = 0;
        [self.contentView addSubview:_content];
        [_content release];
    }return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    [_content mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.bottom.right.equalTo(self.contentView).with.insets(UIEdgeInsetsMake(5, 5, 5, 5));
        
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH - 10, SCREEN_HEIGHT / 2));
    }];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
